package main

import "fmt"

/*
*
数组传参问题
普通的传值 其实是值拷贝
*/
func printArray() {

}

func main() {
	//固定长度的数组
	var myArray1 [10]int

	myArray2 := [10]int{1, 2, 3, 4}
	myArray3 := [4]int{1, 2, 3, 4}

	for i := 0; i < len(myArray1); i++ {
		fmt.Println(myArray1[i])
	}
	for index, value := range myArray2 {
		fmt.Println("index=", index, "value=", value)
	}

	//查看数组类型
	fmt.Printf("my1 types = %T\n", myArray1)
	fmt.Printf("my2 types = %T\n", myArray2)
	fmt.Printf("my3 types = %T\n", myArray3)
}
